Optimal. Leaf size=35 \[ x (a B+A b)+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b B \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2968, 3023, 2735, 3770} \[ x (a B+A b)+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b B \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2968
Rule 3023
Rule 3770
Rubi steps
\begin {align*} \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx &=\int \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac {b B \sin (c+d x)}{d}+\int (a A+(A b+a B) \cos (c+d x)) \sec (c+d x) \, dx\\ &=(A b+a B) x+\frac {b B \sin (c+d x)}{d}+(a A) \int \sec (c+d x) \, dx\\ &=(A b+a B) x+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b B \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 46, normalized size = 1.31 \[ \frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+a B x+A b x+\frac {b B \sin (c) \cos (d x)}{d}+\frac {b B \cos (c) \sin (d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.23, size = 54, normalized size = 1.54 \[ \frac {2 \, {\left (B a + A b\right )} d x + A a \log \left (\sin \left (d x + c\right ) + 1\right ) - A a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B b \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.67, size = 79, normalized size = 2.26 \[ \frac {A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (B a + A b\right )} {\left (d x + c\right )} + \frac {2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 56, normalized size = 1.60 \[ A b x +a B x +\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {A b c}{d}+\frac {b B \sin \left (d x +c \right )}{d}+\frac {B a c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 47, normalized size = 1.34 \[ \frac {{\left (d x + c\right )} B a + {\left (d x + c\right )} A b + A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + B b \sin \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.48, size = 100, normalized size = 2.86 \[ \frac {B\,b\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + B \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________